using System;
using EnvDTE;

namespace Microsoft.WowAddonStudio.Tests.Common.Mocks
{
	/// <summary>
	/// 
	/// </summary>
	public class MockDocument : Document
	{
		private readonly string source;
		private readonly ProjectItem projectItem;

		/// <summary>
		/// Initializes a new instance of the <see cref="MockDocument"/> class.
		/// </summary>
		/// <param name="dte">The DTE.</param>
		/// <param name="source">The source.</param>
		/// <param name="projectItem">The project item.</param>
		public MockDocument(DTE dte, string source, ProjectItem projectItem)
		{
			DTE = dte;
			this.source = source;
			this.projectItem = projectItem;
		}

		#region Document Members

		/// <summary>
		/// Moves the focus to the current item.
		/// </summary>
		public void Activate()
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Closes the open document and optionally saves it, or closes and destroys the window.
		/// </summary>
		/// <param name="Save">Optional. A <see cref="T:EnvDTE.vsSaveChanges"/> constant that determines whether to save an item or items.</param>
		public void Close(vsSaveChanges Save)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Creates a new window in which to view the document.
		/// </summary>
		/// <returns>A <see cref="T:EnvDTE.Window"/> object.</returns>
		public Window NewWindow()
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Re-executes the last action that was undone by the <see cref="M:EnvDTE.Document.Undo"/> method or the user.
		/// </summary>
		/// <returns>
		/// A Boolean value indicating true if there is an undo action to redo, false if not.
		/// </returns>
		public bool Redo()
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Reverses the action last performed by the user in the document.
		/// </summary>
		/// <returns>
		/// A Boolean value indicating true if the last action can be reversed, false if not.
		/// </returns>
		public bool Undo()
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Saves the document.
		/// </summary>
		/// <param name="FileName">Optional. The name in which to save the document. Defaults to the path associated with this document. That is, if an empty string is passed, the document is saved with its current name.</param>
		/// <returns>
		/// A <see cref="T:EnvDTE.vsSaveStatus"/> constant indicating whether or not the save was successful.
		/// </returns>
		public vsSaveStatus Save(string FileName)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Returns an interface or object that can be accessed at run time by name.
		/// </summary>
		/// <param name="ModelKind">Optional. The type of data model.</param>
		/// <returns>An object.</returns>
		public object Object(string ModelKind)
		{
			if (ModelKind == "TextDocument")
			{
				return new MockTextDocument(DTE, source);
			}
			return null;
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		public void PrintOut()
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		public void ClearBookmarks()
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <param name="Pattern"></param>
		/// <param name="Flags"></param>
		/// <returns></returns>
		public bool MarkText(string Pattern, int Flags)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <param name="FindText"></param>
		/// <param name="ReplaceText"></param>
		/// <param name="Flags"></param>
		/// <returns></returns>
		public bool ReplaceText(string FindText, string ReplaceText, int Flags)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Gets the top-level extensibility object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.DTE"/> object.</returns>
		public DTE DTE { get; private set; }

		/// <summary>
		/// Gets a GUID string indicating the kind or type of the object.
		/// </summary>
		/// <value></value>
		/// <returns>A GUID string indicating the kind or type of object.</returns>
		public string Kind
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the collection containing the <see cref="T:EnvDTE.Document"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.Documents"/> collection.</returns>
		public Documents Collection
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the currently active window, or the topmost window if no others are active. Returns Nothing if no windows are open.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.Window"/> object.</returns>
		public Window ActiveWindow
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the full path and name of the object's file.
		/// </summary>
		/// <value></value>
		/// <returns>A string representing the full path and name of the object's file.</returns>
		public string FullName
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the name of the <see cref="T:EnvDTE.Document"/>.
		/// </summary>
		/// <value></value>
		/// <returns>A string representing the file name of the <see cref="T:EnvDTE.Document"/> without the path.</returns>
		public string Name
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the path, without file name, for the directory containing the document.
		/// </summary>
		/// <value></value>
		/// <returns>A string representing the path, without file name, for the directory containing the document.</returns>
		public string Path
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <value></value>
		/// <returns/>
		public bool ReadOnly
		{
			get { throw new NotImplementedException(); }
			set { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Returns true if the object has not been modified since last being saved or opened.
		/// </summary>
		/// <value></value>
		/// <returns>A Boolean value indicating true (default) if the object has not been modified since last being saved or opened; false if otherwise.</returns>
		public bool Saved
		{
			get { throw new NotImplementedException(); }
			set { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets a <see cref="T:EnvDTE.Windows"/> collection containing the windows that display in the object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.Windows"/> collection.</returns>
		public Windows Windows
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the <see cref="T:EnvDTE.ProjectItem"/> object associated with the <see cref="T:EnvDTE.Document"/> object.
		/// </summary>
		/// <value></value>
		/// <returns>A <see cref="T:EnvDTE.ProjectItem"/> object.</returns>
		public ProjectItem ProjectItem
		{
			get { return projectItem; }
		}

		/// <summary>
		/// Gets an object representing the current selection on the <see cref="T:EnvDTE.Document"/>.
		/// </summary>
		/// <value></value>
		/// <returns>An object representing the current selection on the <see cref="T:EnvDTE.Document"/>.</returns>
		public object Selection
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets a list of available Extenders for the object.
		/// </summary>
		/// <value></value>
		/// <returns>An object containing an automation-compliant array of strings.</returns>
		public object ExtenderNames
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the Extender category ID (CATID) for the object.
		/// </summary>
		/// <value></value>
		/// <returns>A string GUID representing the CATID.</returns>
		public string ExtenderCATID
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <value></value>
		/// <returns/>
		public int IndentSize
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <value></value>
		/// <returns/>
		public string Language
		{
			get { throw new NotImplementedException(); }
			set { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <value></value>
		/// <returns/>
		public int TabSize
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Microsoft Internal Use Only.
		/// </summary>
		/// <value></value>
		/// <returns/>
		public string Type
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Get_s the extender.
		/// </summary>
		/// <param name="ExtenderName">Name of the extender.</param>
		/// <returns></returns>
		public object get_Extender(string ExtenderName)
		{
			throw new NotImplementedException();
		}

		#endregion
	}
}